#!/usr/bin/python
# -*- coding: UTF-8 -*-

#! encoding = utf-8

from lib.fenshen import Fenshen
from threading import Thread
from multiprocessing import Process
from lib.func import get_phone_list

tasks = []

def start_fenshen(device_id):
    device = Fenshen(device_id)
    device.start()

if __name__ == "__main__":
    print("分身开始执行")
    for device_id in get_phone_list():
        p = Process(target=start_fenshen, args=(device_id ,))
        tasks.append(p)

    for t in tasks:
        t.start()

    for t in tasks:
        t.join()
    

    




